package com.nightsoul.cxf.interceptor.in;

import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;

public class PreLogicalInterceptor extends AbstractPhaseInterceptor<Message> {

	public PreLogicalInterceptor() {
		super(Phase.PRE_LOGICAL);
	}
	
	@Override
	public void handleMessage(Message message) throws Fault {
		System.out.println(this.getClass().getName());
		
	}

	@Override
	public void handleFault(Message message) {
		//System.out.println("exception:" + message.getContent(Exception.class));
		System.out.println("handle fault in " + this.getClass().getName());	
	}
}
